﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MWRCommunicationLibrary.ARS408
{
    internal abstract class DataFactory
    {
        public static IMWRData GenerateDataExam(int id)
        {
            switch(id)
            {
                case 0x200:
                    return new In_RaderCfg();
                case 0x201:
                    return new Out_RadarState();
                case 0x202:
                    return new In_FilterCfg();
                case 0x203:
                    return new Out_FilterState_Header();
                case 0x204:
                    return new Out_FilterState_Cfg();
                case 0x400:
                    return new In_CollDetCfg();
                case 0x401:
                    return new In_CollDetRegionCfg();
                case 0x408:
                    return new Out_CollDetState();
                case 0x402:
                    return new Out_CollDetRegionState();
                case 0x300:
                    return new In_SpeedInfomation();
                case 0x301:
                    return new In_YawRateInfomation();
                case 0x600:
                    return new Out_Cluster_0_Status();
                case 0x701:
                    return new Out_Cluster_1_General();
                case 0x702:
                    return new Out_Cluster_2_Quality();
                case 0x60A:
                    return new Out_Object_0_Status();
                case 0x60B:
                    return new Out_Object_1_General();
                case 0x60C:
                    return new Out_Object_2_Quality();
                case 0x60D:
                    return new Out_Object_3_Extended();
                case 0x60E:
                    return new Out_Object_4_Warning();
                case 0x700:
                    return new Out_VersionID();
                case 0x8:
                    return new Out_CollDetRelayCtrl();
                default:
                    throw new Exception("CanID Fail To Recognized : 0x" + Convert.ToString(id, 16));
            }
        }
    }
}
